<template>
	<div :class="{cart: cart}">
		<CommonHead :title = "title" :show = "show"></CommonHead>
		<NavBottom></NavBottom>
		<NoGoods v-show="noGoods"></NoGoods>
	</div>
</template>

<script>
	import NavBottom from "./NavBottom.vue"
	import CommonHead from "./CommonHead.vue"
	import NoGoods from "./NoGoods.vue"
	
	export default{
		data: function(){
			return {
				title: "",
				show: "",
				cart: true,
				noGoods: true
			}
		},
		components:{
			CommonHead,
			NoGoods,
			NavBottom
		},
		methods:{
			fetchData(){
				var _this = this;
				this.$http.get("src/json/data.json").then(function(res){
					_this.title = res.data.commonHead[1].name;
					_this.show = res.data.commonHead[1].show;
				})
			}
			
		},
		mounted: function(){
			this.fetchData();
			
		}
	}
</script>

<style>
</style>